﻿
Imports System.Threading

Public Module _definition
    Public Delegate Sub void()
    Public Delegate Sub void(Of T)(ByRef i As T)
    Public Delegate Sub void(Of T1, T2)(ByRef i1 As T1, ByRef i2 As T2)
    Public Delegate Sub void(Of T1, T2, T3)(ByRef i1 As T1, ByRef i2 As T2, ByRef i3 As T3)
    Public Delegate Sub void(Of T1, T2, T3, T4)(ByRef i1 As T1, ByRef i2 As T2, ByRef i3 As T3, ByRef i4 As T4)
    Public Delegate Sub void(Of T1, T2, T3, T4, T5)(ByRef i1 As T1,
                                                    ByRef i2 As T2,
                                                    ByRef i3 As T3,
                                                    ByRef i4 As T4,
                                                    ByRef i5 As T5)

    Public Delegate Function _do(Of RT)() As RT
    Public Delegate Function _do(Of T, RT)(ByRef i As T) As RT
    Public Delegate Function _do(Of T, T2, RT)(ByRef i As T, ByRef i2 As T2) As RT
    Public Delegate Function _do(Of T, T2, T3, RT)(ByRef i As T, ByRef i2 As T2, ByRef i3 As T3) As RT
    Public Delegate Function _do(Of T, T2, T3, T4, RT)(ByRef i As T,
                                                       ByRef i2 As T2,
                                                       ByRef i3 As T3,
                                                       ByRef i4 As T4) As RT
    Public Delegate Function _do(Of T, T2, T3, T4, T5, RT)(ByRef i As T,
                                                           ByRef i2 As T2,
                                                           ByRef i3 As T3,
                                                           ByRef i4 As T4,
                                                           ByRef i5 As T5) As RT
End Module
